package vo
{
	import mx.collections.ArrayCollection;
	
	[Bindable]
	public class ModelLocator
	{
		
		public var serverUrl:String="http://218.64.131.24:8080/ey12";
		public var salernot:String = "false";
		//public var serverUrl:String="http://localhost:8080/ey12";

		public var imSalerEnabled:Boolean=false;
		private  static var instance:ModelLocator;
		
		static public function getInstance():ModelLocator {
			if(instance == null)
	             instance = new  ModelLocator();
	        return instance;	 
		}
		public var orders:ArrayCollection=new ArrayCollection();

 		public var homeListData:ArrayCollection=new ArrayCollection();
 	
		public var selectedGmUser:GmUser;
		public var loginedManager:GmManager;
		public var selectedGmOrder:GmOrder;
	
		public var logOrnot:String = "false";
	
		/* public var firstCbxSelected:String;
		public var secondCbxSelected:String;
		public var thirdCbxSelected:String;
		public var lastCbxSelected:String;
		public var serverNameTxtinpt:String; */
		public var newOrder:GmOrder;
		public var selectedGame:ArrayCollection=new ArrayCollection();
		public var shopingList:ArrayCollection=new ArrayCollection();
		public var buyGame:GmOrder=new GmOrder();
		public var buyerWebGet:Number=0;
		public var salerWebGet:Number=0;
		public var buyerMessege:String;
		public var saleMessage:String;
		public var messegeShowOrNot:Boolean=false;
		public var newMessageCount:int=0;
		public var orderMessegeType:String="";
		public  var menu:XMLList;
		
		public function ModelLocator()
		{
		}
	   public function getMenu():void {
       var type:int=int(ModelLocator.getInstance().loginedManager.usertype);	
       switch(type){ 
       case 1:{
       menu= new XMLList( <node label="菜单" link="null">
            <node label="基本设置" link="null">
                <node label="等级提成管理" link="back/bonusLeverMgt.swf"/>
                <node label="游戏管理" link="back/areaServerMgt.swf"/>
                <node label="交易员管理" link="back/bsnMgt.swf"/>
                <node label="公告管理" link="back/noticeMgt.swf"/>
                <node label="首页广告栏管理" link="back/HomeViewAdMgt.swf"/>
                <node label="招商合作" link="back/cpMgt.swf"/>
                <node label="投诉建议" link="back/complainMgt.swf"/>
             </node>
            <node label="会员管理" link="null">
                <node label="未审卖家" link="back/uncheckedSaler.swf"/>
                <node label="会员列表" link="back/memberMgt.swf"/>
                <node label="会员提现管理" link="back/memberCashDraw.swf"/>
                <node label="会员充值记录" link="back/memberChargValue.swf"/>
                <node label="会员商品下架" link="back/memberBusinise.swf"/>
            </node>
            <node label="订单管理" link="null">
            	<node label="订单管理" link="back/orderFormMgt.swf"/>
            </node>      
             <node label="系统管理" link="null">
             	<node label="人员设置" link="back/manageSet.swf"/>
            	<node label="修改密码" link="MOD"/>
            	<node label="退出系统" link="EXIT"/>
            </node> 
        </node>  
        );
        break;
       }
       
      case 3:{
       menu= new XMLList( <node label="菜单" link="null">
             <node label="会员管理" link="null">
                <node label="会员列表" link="back/memberMgt.swf"/>
                <node label="会员提现管理" link="back/memberCashDraw.swf"/>
                <node label="会员充值记录" link="back/memberChargValue.swf"/>
            </node>
            <node label="订单管理" link="null">
            	<node label="订单管理" link="back/orderFormMgt.swf"/>
            </node>      
             <node label="系统管理" link="null">
            	<node label="修改密码" link="MOD"/>
            	<node label="退出系统" link="EXIT"/>
            </node> 
        </node>  
        );
        break;
       }
       
        case 2:{
       menu= new XMLList( <node label="菜单" link="null">
            <node label="基本设置" link="null">
                <node label="公告管理" link="back/noticeMgt.swf"/>
                <node label="招商合作" link="back/cpMgt.swf"/>
                <node label="投诉建议" link="back/complainMgt.swf"/>
             </node>
            <node label="会员管理" link="null">
                <node label="未审卖家" link="back/uncheckedSaler.swf"/>
                <node label="会员列表" link="back/memberMgt.swf"/>
                <node label="会员商品下架" link="back/memberBusinise.swf"/>
            </node>
            <node label="订单管理" link="null">
            	<node label="订单管理" link="back/orderFormMgt.swf"/>
            </node>      
             <node label="系统管理" link="null">
            	<node label="修改密码" link="MOD"/>
            	<node label="退出系统" link="EXIT"/>
            </node> 
        </node>  
        );
        break;
       }
       
      
       
       }
  
      }
	}
}